package com.fetch.ui;

import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.Font;

import javax.swing.JDialog;
import javax.swing.JPanel;
import javax.swing.JLabel;
import java.awt.ComponentOrientation;
import javax.swing.SwingConstants;

public class AboutDialog extends JDialog {
    
    private static final long serialVersionUID = 1L;
    
    public static final int DEFAULT_WIDTH = 210;
    public static final int DEFAULT_HEIGHT = 115;
    
    private JPanel panel;
    
    public AboutDialog(){
        panel = new JPanel();
        
        setTitle("关于本软件");
        setSize(DEFAULT_WIDTH, DEFAULT_HEIGHT);
        setLocationRelativeTo(null);
        getContentPane().add(panel, BorderLayout.EAST);
        
        panel.setFont(new Font("微软雅黑", Font.PLAIN, 12));
        panel.setPreferredSize(new Dimension(194, 77));
        
        JLabel author = new JLabel("作者：侯金鑫");
        author.setFont(new Font("微软雅黑", Font.PLAIN, 12));
        author.setHorizontalAlignment(SwingConstants.CENTER);
        author.setBorder(null);
        author.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);
        author.setPreferredSize(new Dimension(194, 20));
        panel.add(author);
        
        JLabel qq = new JLabel("QQ：574311651");
        qq.setFont(new Font("微软雅黑", Font.PLAIN, 12));
        qq.setHorizontalAlignment(SwingConstants.CENTER);
        qq.setPreferredSize(new Dimension(194, 20));
        panel.add(qq);
        
        JLabel email = new JLabel("邮箱：woshihoujinxin@163.com");
        email.setFont(new Font("微软雅黑", Font.PLAIN, 12));
        email.setHorizontalAlignment(SwingConstants.CENTER);
        email.setPreferredSize(new Dimension(194, 20));
        panel.add(email);
        

    }
}
